package com.ymatou.iapi.liveseller.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.liveseller.parameter.CreateSellerPreVideoBean;
import com.ymatou.iapi.liveseller.service.CreateSellerPreVideoCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.LiveRoomCallService;
/**
*创建预告Test
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_CreateSellerPreVideo{
	private static CreateSellerPreVideoBean createsellerprevideoBean;
	private static CreateSellerPreVideoCall createsellerprevideoCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("创建预告Test");
	}

	@Before
	public void caseUp() {
		createsellerprevideoBean=new CreateSellerPreVideoBean();
		createsellerprevideoCall=new CreateSellerPreVideoCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(createsellerprevideoCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_CreateSellerPreVideo_001() {
		Logger.start(true,"正确数据，成功");
		try {
			
			createsellerprevideoBean = LiveRoomCallService.initCreatesellerPreVideoBean(null);
			createsellerprevideoCall.setData(createsellerprevideoBean);
			createsellerprevideoCall.callService();			
			Logger.verifyEquals("200", createsellerprevideoCall.getString("Code"), "验证code");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}